home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group02b.txt / 000060_icon-group-sender_Fri Oct 4 12:30:10 2002.msg < prev    next >
Internet Message Format  |  2003-01-02  |  4KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id g94JU7w11408
  4.     for icon-group-addresses; Fri, 4 Oct 2002 12:30:07 -0700 (MST)
  5. Message-Id: <200210041930.g94JU7w11408@baskerville.CS.Arizona.EDU>
  6. From: Andrew Shi-hwa Chen <chenandr@cse.msu.edu>
  7. X-Newsgroups: comp.lang.icon
  8. Subject: Re: Icon Wish List
  9. Date: Fri, 04 Oct 2002 11:30:47 -0400
  10. X-Accept-Language: en
  11. To: icon-group@cs.arizona.edu
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13. Status: RO
  14.  
  15. This is a multi-part message in MIME format.
  16. --------------BD999B6AED3EAC0F935360F4
  17. Content-Type: text/plain; charset=us-ascii
  18. Content-Transfer-Encoding: 7bit
  19.  
  20. This sounds like how OO is done in LPC, which isn't really bad at all. I
  21. rather like the one-file one-class model myself, but a big problem with
  22. it is reloading if the file changes. Also, another big problem with it
  23. is if people with Java backgrounds start using Icon, they'll want all
  24. sorts of classes for all sorts of things (listeners, adaptors,
  25. interfaces, etc...) and the code will bloat to the point where Icon will
  26. look like a much more complicated Java.
  27.  
  28. I would recommend subclassing that's single-inheritence and inferred
  29. from directory structure. A directory with a class of the same name in
  30. it would be the parent class, child classes would have different names
  31. (but in the same directory), grand children would be in a subdirectory,
  32. etc.... Having both a file with a name (say "foo") and a directory with
  33. that name and a file with that name in it (say "foo" with "foo" in it)
  34. would be an error.
  35.  
  36. Why this way?
  37.  
  38. 1) The file browser doubles as a class browser.
  39. 2) It promotes the use of class clusters a la Objective-C.
  40. 3) Similar to Java packages, it makes for a very clean and easy to
  41. understand namespace organization.
  42.  
  43. But I would highly recommend against creating any kind of standard class
  44. library or anything like that. Don't force OO on people that don't want
  45. it - let them continue to use it as a scripting language if they want to
  46. (a la Python) - let them code anything (GUI apps, etc...) without
  47. needing to subclass this or that or whatever.
  48.  
  49. "Shmuel (Seymour J.) Metz" wrote:
  50. > In <ambeg5$4gk5e$1@ID-79573.news.dfncis.de>, on 09/19/2002
  51. >    at 12:57 PM, "Andrew Hamm" <ahamm@mail.com> said:
  52. > >Since Icon is completely free with variable types and call arguments,
  53. > >it follows that class members should not be typed,
  54. > No. The class is the type.
  55. > >and overloaded methods do
  56. > >not make sense either
  57. > They make perfect sense if you allow subclasses and such.
  58. > >one name, one method
  59. > Too restrictive, and destroys some of the value of OO programming.
  60. > >What about member privacy? With the 1 file, 1 class model, it does
  61. > >become possible to add a "private" keyword for class methods,
  62. > >members and statics. If marked as private, the member is not visible
  63. > >outside the file. However, that does not fit at all with the dynamic
  64. > >typing of Icon.
  65. > Yes it does. Don't confuse the scope of the name with the lifetime of
  66. > the object.
  67. > >However,
  68. > >that does not fit at all with the dynamic typing of Icon.
  69. > It fits in perfectly. All that changes is that there are more possible
  70. > types.
  71. > >How do you know the type of a particular variable at any one time?
  72. > The same way as in any other language with dynamic types.
  73. > >To do this "properly" on UNIX, the compiler could probably write to
  74. > >a tmp file (not linked into a directory) and then hand the open file
  75. > >handles off to a cooperating iconx which can slurp up the icode from
  76. > >the tmp file handles and then close them, resulting in their
  77. > >deallocation.
  78. > Bletch!
  79.  
  80. -- 
  81. Andrew Chen
  82. --------------BD999B6AED3EAC0F935360F4
  83. Content-Type: text/x-vcard; charset=us-ascii;
  84.  name="chenandr.vcf"
  85. Content-Transfer-Encoding: 7bit
  86. Content-Description: Card for Andrew Shi-hwa Chen
  87. Content-Disposition: attachment;
  88.  filename="chenandr.vcf"
  89.  
  90. begin:vcard 
  91. n:Chen;Andrew
  92. x-mozilla-html:FALSE
  93. url:http://www.cse.msu.edu/~chenandr/
  94. org:Michigan State University;Computer Science and Engineering
  95. version:2.1
  96. email;internet:chenandr@cse.msu.edu
  97. title:Teaching Assistant
  98. adr;quoted-printable:;;3315 Engineering Building=0D=0Ac/o Computer Science Department;East Lansing;Michigan;48825;USA
  99. x-mozilla-cpt:;0
  100. fn:Andrew Chen
  101. end:vcard
  102.  
  103. --------------BD999B6AED3EAC0F935360F4--
  104.  
  105.